package com.game.util;

public class ResultInfo {
	
	private String code;
	private String message;
	private Object result;
	
	public static final ResultInfo SUCCESS = new ResultInfo(ResultEnum.SUCCESS);
	public static final ResultInfo ERROR = new ResultInfo(ResultEnum.SERVICEERROR);
	public ResultInfo(ResultEnum resultEnum,Object result){
		this.result = result;
		this.code = resultEnum.getCode();
		this.message = resultEnum.getMessage();
	}
	
	public ResultInfo(ResultEnum resultEnum){
		this.code = resultEnum.getCode();
		this.message =resultEnum.getMessage();
	}
	
	public ResultInfo(String code,String message){
		this.code = code;
		this.message = message;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public Object getResult() {
		return result;
	}
	public void setResult(Object result) {
		this.result = result;
	}
	
	
	
}
